(function () {
  return {
    "type": "page",
    "initApi": "/b/permits/init",
    "title": "专家余额提现",
    "toolbar": [
    ],
    "body": {
      "type": "crud",
      "className": "break-all",
      "hideQuickSaveBtn": true,
      "api": "get:/b/fb/index",
      "quickSaveApi": "post:/b/fb/batch",
      "quickSaveItemApi": "post:/b/fb/item?id=$id",
      // "itemCheckableOn": "this.is_super !== 1 && this.leader_count === 0",
      "perPage": 10,
      "keepItemSelectionOnPageChange": true,
      "maxKeepItemSelectionLength": 20,
      "pageField": "page",
      "perPageField": "page_size",
      "labelTpl": "${name}",
      "syncLocation": false,
      "filter": {
        "title": "条件搜索",
        "submitText": "搜索",
        "controls": [
          {
            "label": "交易单号：",
            "type": "text",
            "size": "sm",
            "name": "number",
            "placeholder": "请输入"
          },
          // 订单状态 1 待审核 2 审核驳回 3 审核通过 4 提现成功
          {
            "label": "订单状态",
            "type": "select",
            "size": "sm",
            "name": "type",
            "searchable": true,
            "clearable": true,
            "placeholder": "请选择",
            "options": [
              {
                "label": "待审核",
                "value": 1
              },
              {
                "label": "审核驳回",
                "value": 2
              },
              {
                "label": "审核通过",
                "value": 3
              },
              {
                "label": "提现成功",
                "value": 4
              },
            ]
          },
          // {
          //   "label": "订单状态",
          //   "type": "select",
          //   "size": "sm",
          //   "name": "status",
          //   "searchable": true,
          //   "placeholder": "请选择",
          //   "source": "get:/b/fb/status",
          // },
        ],
        "actions": [
          {
            "type": "button",
            "actionType": "clear",
            "label": "重置"
          },
          {
            "type": "button",
            "actionType": "submit",
            "label": "搜索",
            "level": "primary",
          }
        ]
      },
      "bulkActions": [
        // {
        //   "label": "批量删除",
        //   "visibleOn": "isInArray(this.front_end, 'admin_list_delete')",
        //   "level": "danger",
        //   "actionType": "ajax",
        //   "api": "post:/b/admin/del/${ids|raw}",
        //   "confirmText": "确定要批量删除?"
        // }
      ],
      "filterTogglable": true,
      "headerToolbar": [
        "filter-toggler",
        "bulkActions",
        {
          "type": "columns-toggler",
          "align": "right"
        },
        {
          "type": "pagination",
          "align": "right"
        }
      ],
      "footerToolbar": [
        "statistics",
        "switch-per-page",
        "pagination"
      ],
      "columns": [
        {
          "name": "id",
          "label": "ID",
          "hidden": true,
          "sortable": true,
          "type": "text",
          "toggled": true
        },
        {
          "name": "number",
          "label": "交易单号",
          "sortable": false,
          "searchable": false,
          "type": "text",
          "toggled": true,
        },
        {
          "name": "expert_name",
          "label": "提现人",
          "sortable": false,
          "searchable": false,
          "type": "text",
          "toggled": true,
        },
        {
          "name": "created_at",
          "label": "下单时间",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "amount",
          "label": "提现金额(元)",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "actual_amount",
          "label": "实际打款金额(元)",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "type_map",
          "label": "订单状态",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "created_at",
          "label": "创建时间",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "remark",
          "label": "备注",
          "sortable": false,
          "searchable": false,
          "type": "text",
          "toggled": true,
        },
        {
          "type": "operation",
          "fixed": "right",
          "label": "操作",
          "buttons": [
            {
              "type": "button",
              "label": "审核",
              // "visibleOn": "this.refund_status === 2 && isInArray(this.front_end, 'work_housing_air_update')",
              "visibleOn": "this.type === 1",
              "level": "primary",
              "actionType": "drawer",
              "drawer": {
                "position": "right",
                "size": "lg",
                "title": "审核",
                "closeOnOutside": true,
                "closeOnEsc": true,
                "resizable": true,
                "body": {
                  "type": "form",
                  // "debug": true,
                  "name": "审核",
                  "canAccessSuperData": false,
                  // "data": {
                  //   "refund_status": 3,
                  // },
                  "api": "post:/b/fb/rr?id=$id",
                  "body": [
                    {
                      "type": "radios",
                      "name": "type",
                      "size": "lg",
                      "label": '是否通过审核',
                      "required": true,
                      "options": [
                        {
                          "label": "通过",
                          "value": 3
                        },
                        {
                          "label": "驳回",
                          "value": 2
                        }
                      ]
                    },
                    {
                      "name": "reject_remark",
                      "type": "textarea",
                      "size": "lg",
                      "label": "驳回原因",
                      "maxLength": 255,
                      "required": true,
                      "visibleOn": "this.type === 2",
                      "placeholder": "最多255个字"
                    },
                  ]
                }
              }
            },
          ],
          "toggled": true
        }
      ]
    }
  };
})();